﻿using System.IO;

namespace Atha
{
	public class TestScriptFileWriter : ITestScriptWriter
	{
		/// <summary>
		/// Saves the script.
		/// </summary>
		/// <param name="script">The script.</param>
		public void SaveScript(ITestScript script)
		{
			if (File.Exists(script.Title))
				File.Delete(script.Title);

			File.WriteAllText(script.Title, script.Content);
		}
	}
}
